package com.rookie.shiro.module.controller;

import com.rookie.shiro.module.constant.TokenTypeEnum;
import com.rookie.shiro.module.constant.annotation.PermissionDesc;
import com.rookie.shiro.module.util.JwtUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {



    @RequestMapping("test")
    @PermissionDesc(value = "role:test", message = "测试权限")
    public String test() {
        return "ok";
    }

    @RequestMapping("login")
    public String login() {
        return JwtUtils.sign("", TokenTypeEnum.WE_CHAT.getMessage());
    }

    @RequestMapping("end")
    public String end() {
        return "oo";
    }
}
